package com.burgeon.backend.SHOP.rest;
/**
 * phone搜索会员数据
 */

import com.burgeon.backend.Rest.base.RESTBase;
import com.burgeon.backend.entity.User;
import com.burgeon.backend.service.ex.UserNotFoundException;
import org.json.JSONArray;
import org.springframework.util.MultiValueMap;

import java.util.ArrayList;
import java.util.HashMap;

public class demo extends RESTBase {

    private String ip;
    private String account;
    private String password;

    public demo(String ip, String account, String password) {
        this.ip = ip;
        this.account = account;
        this.password = password;
    }

    /**
     * 发送并接收字符创
     *
     * @return
     */

    public HashMap getData() throws Exception {
        String url = "http://" + ip + "/servlets/binserv/Rest";

        String str = RESULT(Data(), url);
        System.err.println(str);

        return null;
    }

    private MultiValueMap Data() {
        HashMap params = new HashMap();
        params.put("'XSNO'",12313);
        params.put("BILLDATE","20200817");
        params.put("RECEIVER_NAME","cs");

        params.put("RECEIVER_ADDRESS","测试");//舒适度
        params.put("RECEIVER_MOBILE","17732141036");//快递包装
        params.put("C_VIP_ID__CARDNO","17732141036");//送货速度


        params.put("table", "YC_RETAIL");//表名

        return DATA("ObjectCreate", params, account, password);
    }

    public static void main(String[] args) {
        demo g = new demo("39.99.239.133:55321","nea@burgeon.com.cn","burgeon55321");
        try {
            System.err.println(g.getData());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


}
